package com.zx.systembook.serviceImp;

import com.zx.systembook.mapper.TablesMgMapper;
import com.zx.systembook.model.TablesMg;
import com.zx.systembook.service.TableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class TableServiceImp implements TableService {
    @Autowired
    TablesMgMapper tablesMgMapper;
    @Override
    public void save(TablesMg tablesMg) {
        tablesMgMapper.insert(tablesMg);
    }

    @Override
    public void update(TablesMg tablesMg) {
        tablesMgMapper.updateByPrimaryKey(tablesMg);
    }

    @Override
    public List<TablesMg> selectAll() {
        return tablesMgMapper.selectAll();
    }
}
